﻿<UserControl x:Class="WowModelExplorer.Controls.SetSelect"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:data="clr-namespace:WowModelExplorer.Data"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DesignHeight="500"
             mc:Ignorable="d">
    <Grid Name="_mainGrid">
        <Grid.Resources>
            <data:SetCollection x:Key="_sets" />
        </Grid.Resources>

        <Grid.RowDefinitions>
            <RowDefinition Height="23" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <Border>
                <TextBox Name="filter"
                         Margin="1,1,1,1"
                         TextChanged="filter_TextChanged" />
            </Border>
        </Grid>


        <ListView Name="_listView"
                  Grid.Row="1"
                  ItemsSource="{Binding Source={StaticResource _sets},
                                        Mode=OneTime}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Width="120" DisplayMemberBinding="{Binding Path=Name}">
                        <GridViewColumnHeader Click="GridViewColumnHeader_Click" Tag="Name" Content="{DynamicResource setNames}"/>
                    </GridViewColumn>
                    <GridViewColumn Width="60" DisplayMemberBinding="{Binding Path=Id}">
                        <GridViewColumnHeader Click="GridViewColumnHeader_Click" Tag="Id" Content="{DynamicResource id}"/>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</UserControl>
